<template>
  <div>
		<el-table
			height="385"
			ref="table"
			stripe
			empty-text
			fit
			v-loading="tableLoading"
			class="table-wrap single-select-table"
			:data="tableData"
			:row-style="tableRowStyle"
			:row-class-name="tableRowClassName"
			@row-click="rowClick"
			@selection-change="handleSingleSelectionChange">
			<el-table-column align="center" type="index" :label="$t('m.index')" width="50"></el-table-column>
			<el-table-column align="center" prop="noticenumber" :label="$t('m.in.noticenumber')"></el-table-column>
			<el-table-column align="center" prop="plannedquantity" :label="$t('m.home.plannedarrivals')"></el-table-column>
			<el-table-column align="center" prop="planeddate" :label="$t('m.in.planeddate')">
				<template slot-scope="scope">{{scope.row.planeddate|dateFilter}}</template>
			</el-table-column>
			<el-table-column align="center" prop="expiretime" :label="$t('m.home.overtime')">
				<template slot-scope="scope">{{scope.row.expiretime}}h</template>
			</el-table-column>
		</el-table>
		<el-pagination
			background
			layout="sizes, prev, pager, next, jumper"
			:page-sizes="pageSizeList"
			:page-size="rowSize"
			:current-page="page"
			:total="totalRows"
			@current-change="currentChange"
			@size-change="handleSizeChange"
		></el-pagination>
	</div>
</template>
<script>
export default {
  name:'inbound-arrival-table',
  data(){
    return {
      tableData:[]
    }
  },
  mounted(){
    this.getData()
  },
  methods:{
    getData(){
      let options = {
        method:'get',
        url:`/homepage/getexpiredarrivalnoticelist`,
        params:{
          page:this.page,
          rows:this.rowSize
        }
      }
      this.$axios(options).then(({ data }) => {
        this.tableData = data.records
        this.totalRows = data.total
        this.page = data.current
      })
    },
    close(){
      this.$emit('close')
    }
  }
}
</script>
<style lang="scss" scoped>
.el-pagination {
  position: relative;
}
</style>